/**
 * MineAdmin is committed to providing solutions for quickly building web applications
 * Please view the LICENSE file that was distributed with this source code,
 * For the full copyright and license information.
 * Thank you very much for using MineAdmin.
 *
 * @Author X.Mo<root@imoi.cn>
 * @Link   https://github.com/mineadmin
 */

import type { MaSearchItem } from "@mineadmin/search";

import MaDictSelect from "@/components/ma-dict-picker/ma-dict-select.vue";

export default function getSearchItems(t: any): MaSearchItem[] {
  return [
    {
      label: "商户名称",
      prop: "merchant_name",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "商户名称" }) },
    },
    {
      label: "合同标题",
      prop: "contract_title",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "合同标题" }) },
    },
    {
      label: "甲方",
      prop: "party_a",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "甲方" }) },
    },
    {
      label: "乙方",
      prop: "party_b",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "乙方" }) },
    },
    {
      label: "合同金额",
      prop: "contract_amount",
      render: "input",
      renderProps: { placeholder: t("form.pleaseInput", { msg: "合同金额" }) },
    },
    {
      label: "付款方式",
      prop: "payment_method",
      render: () => MaDictSelect,
      renderProps: {
        data: [
          { label: "银行转账", value: 1 },
          { label: "微信支付", value: 2 },
          { label: "支付宝支付", value: 3 },
          { label: "现金", value: 4 },
          { label: "其他付款方式", value: 5 },
        ],
        placeholder: t("form.pleaseInput", { msg: "付款方式" }),
        clearable: true,
        multiple: false,
      }
    },
  ];
}
